--#include "data\config\equip\EquipExchangeConfig.lua" once

function EquipExchangeFunc(sysarg1, sysarg2, itemId)
	
	local ExchangeAward = EquipExchangeCfg[itemId]
	if not ExchangeAward then
		return
	end

	local itemName = Item.getItemName(itemId)
	local logId	 = GameLog.clEquipExchange
	local logStr = Lang.ScriptTips.EquipExchange001
	local title  = Lang.ScriptTips.EquipExchange002
	local content= Lang.ScriptTips.EquipExchange003
	local actorId1 = Actor.getActorId(sysarg1)
	Awards.GiveToMailById(actorId1, ExchangeAward, title, string.format(content, Actor.getName(sysarg2), itemName), logId, logStr) 

	local actorId2 = Actor.getActorId(sysarg2)
	Awards.GiveToMailById(actorId2, ExchangeAward, title, string.format(content, Actor.getName(sysarg1), itemName), logId, logStr) 
end



